//
//  MYNewsParentingSearchVC.m
//  MuYing
//
//  Created by tbb on 2019/8/6.
//  Copyright © 2019 TBB. All rights reserved.
//

#import "MYNewsParentingSearchVC.h"
#import "MYNewsDetailsScenicspotVC.h"
#import "MYNewsModel.h"
@interface MYNewsParentingSearchVC ()

@end

@implementation MYNewsParentingSearchVC

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
}

-(void)setupView {
    [super setupView];
    
}

- (nonnull UITableViewCell *)tableView:(nonnull UITableView *)tableView cellForRowAtIndexPath:(nonnull NSIndexPath *)indexPath {
    MYNewsGoodsCell *cell = [tableView dequeueReusableCellWithIdentifier:@"MYNewsGoodsCell"];
    MYNewsModel *newsModel = nil;
    if (indexPath.row < self.dataArr.count) {
        newsModel = self.dataArr[indexPath.row];
    }

    cell.newsModel = newsModel;
    return cell;
}

-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
    MYNewsModel *newsModel = nil;
    if (indexPath.row < self.dataArr.count) {
        newsModel = self.dataArr[indexPath.row];
    }
    MYNewsDetailsScenicspotVC * scenicspotVC = [[MYNewsDetailsScenicspotVC alloc] init];
    scenicspotVC.informationCategoryId = self.categoryId;
    scenicspotVC.informationId = newsModel.Id;
    kYQPUSH(scenicspotVC);
}
@end
